<div class="grid_9">
<?if(isset($message))echo $message;?>
<?php if($this->session->flashdata('type')): ?>
	<div class="<?php echo $this->session->flashdata('type')?>"><?php echo $this->session->flashdata('msg')?></div>
<?php endif; ?>

<div class="inner-border">
<h6><?=$mode;?> School year</h6>
<?if(!empty($sy_data)):?>
<?
foreach($sy_data as $key => $value){
		
		if($value->current_year == 0){
			// data from school year that is not the current school year
			$not_current[$key] = $value;
		}else{
			//current school year
			$current[$key] = $value;
		}
}
?>

		<div class="school_year">
			<?  // if not empty $not_current, there are other school year entries
				if(!empty($current)):?>
						<?foreach($current as $current_sy):?>
								<div class="input-block ">
									<a class="btn">Current School Year</a>
									<?='<p class="content">'.$current_sy->sy_title.'</p><br><p class="content">'.$current_sy->sy_year.'</p><br><p class="content">'.$current_sy->sy_desc.'</p><br>'?>
							</div>
							<hr>
						<?endforeach;?>
				<?endif;?>
				<?if(!empty($not_current)):?>
						<?foreach($not_current as $available_menu):?>
							<div class="input-block">
								<?='<p class="content">'.$available_menu->sy_title.'</p><br><p class="content">'.$available_menu->sy_year.'</p><br><p class="content">'.$available_menu->sy_desc.'</p><br>'?>
								<a href="<?php echo site_url('admin/functions_schoolyear/delete/'.$available_menu->sy_id) ?>" class="btn">Delete School Year <?=$available_menu->sy_year;?></a>
							</div>
							<hr>
						<?endforeach;?>
				<?endif;?>
		</div>
	
	
	 
<?else:?>
	<div class="input-block">
		<div class="notice">No Data to retrieve</data>
	</div>

<?endif;?>
		
<a href="<?php echo site_url('admin/school_year') ?>" class="btn">Cancel</a>

</div>
</div>